<template>
  <div>
      <TabBar :items='tabList'  @getIndex="getIndex"></TabBar>
      <keep-alive>
        <component :is="currentView"></component>
      </keep-alive>
  </div>

</template>

<script>
import TabBar from '../../../../components/TabBar'
import Tab1 from './tab1Component/Tab1'
import Tab2 from './tab1Component/Tab2'
import Tab3 from './tab1Component/Tab3'
import Tab4 from './tab1Component/Tab4'

export default {
  name: 'fundUserInfo',
  data () {
    return {
      currentIndex: '',
      active: 0,
      currentView: 'tab1',
      tabList: [
        {name: 1, label: '基本信息'},
        {name: 2, label: '关键人信息'},
        {name: 3, label: '征信信息'},
        {name: 4, label: '管理人概况'}
      ],
      tabConent: [
        {
          type: 'tab1',
          view: 'Tab1'
        },
        {
          type: 'tab2',
          view: 'Tab2'
        },
        {
          type: 'tab3',
          view: 'Tab3'
        },
        {
          type: 'tab4',
          view: 'Tab4'
        }
      ]
    }
  },
  components: {
    TabBar,
    Tab1,
    Tab2,
    Tab3,
    Tab4
  },
  methods: {
    getIndex (index) {
      this.currentIndex = index
      this.currentView = this.tabConent[index].type
    }
  }
}
</script>

<style lang="stylus" scoped>
  .md-tab-bar-item
    font-size 20px
    color blue
</style>
